/**
 * @author zhaozhenjiang
 * 创建数据库软件安装响应文件
 * */

package com.auto.oracle;

final class createListener {
	private createFile lsten = null;
	private String lisPath = null;
	public createListener(String base_path,String resp_name,createParams para){
		lsten = new createFile(base_path, resp_name);
		lisPath = para.getOraclePath() + "/app/oracle/product/" + para.getVersion() + "/db_1/network/admin/listener.ora";
	}
	
	public void createFile(){
		lsten.init();
		lsten.append("echo 'LISTENER ='>> " + lisPath);
		lsten.append("echo '  (DESCRIPTION_LIST ='>> " + lisPath);
		lsten.append("echo '    (DESCRIPTION ='>> " + lisPath);
		lsten.append("echo '      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))' >> " + lisPath);
		lsten.append("echo '      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))' >> " + lisPath);
		lsten.append("echo '    )' >> " + lisPath);
		lsten.append("echo '  )' >> " + lisPath);
		lsten.close();
		lsten = null;
	}	

	@SuppressWarnings("unused")
	private class Decompile{
		
	}
}
